// comm/views/hdModalView/hdModalView.js
import S_request from '../../../utils/requestService.js';
import CONFIG from '../../../config.js';
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    modalObj: {
      type: Object,
      value: null
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    modalObj: {},
    quanList: [{
      id: 1,
      gold: 1000,
      num: 1
    }, {
      id: 2,
      gold: 2700,
      num: 3
    }, {
      id: 3,
      gold: 4000,
      num: 5
    }],
  },

  /**
   * 组件的方法列表
   */
  methods: {
    returnEevet: function(e) {},
    closeBtnAc: function(e) {
      this.triggerEvent('closeBtnAc', e)
    },
    excTicktes:function(e){
      let id = e.currentTarget.dataset.id;
      for(let i = 0; i < this.data.quanList.length; i++) {
        let item = this.data.quanList[i];
        if(item.id == id) {
          S_request.duobao.excTicket(item.num, item.gold, (result)=>{

          })
        }
      }
    }
  }
})